package com.copm.ifm.common.process.pojo.define;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.copm.ifm.base.api.pojo.BasePO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.Set;

/**
 * 流程节点定义实体类
 *
 * @author zzf
 * @date 12:01 2021/3/16
 */
@Getter
@Setter
@TableName("process_node_define")
@ApiModel("流程节点定义实体类")
public class ProcessNodeDefine extends BasePO {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("流程id")
    private Integer processId;

    @ApiModelProperty("流程条件id")
    private Integer processConditionId;

    @ApiModelProperty("节点序号")
    private Integer orderNum;

    @ApiModelProperty("操作对象")
    private Integer operationTarget;

    @ApiModelProperty("操作对象id集合json字符串")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Set<Integer> targetIds;

    @ApiModelProperty("通过类型 1：所有人通过才算通过 2：一个人通过就可通过")
    private Integer passType;

    /**
     * @see com.copm.ifm.common.process.core.emum.ProcessHandleTypeEnum
     */
    @ApiModelProperty("操作类型")
    private Integer operationType;

}
